<?php

/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2017/7/4
 * Time: 11:20
 */

namespace app\common\model;
use think\Model;

class ArticleCate extends Basemodel
{

    protected $autoWriteTimestamp = true;
//    protected $auto = ['name', 'ip'];
    protected $insert = ['status' => 1];
    protected $update = [];

    public function del($id)
    {
        $uid = $this->where('id', $id)->value('pid');
        $this->where('pid', $id)->update(['pid' => $uid]);
        return $this->where('id', $id)->delete();
    }



}